

var aAnswers= new Array (5)
aAnswers[ 0 ]=0;
aAnswers[ 1 ]=2;
aAnswers[ 2 ]=1;
aAnswers[ 3 ]=1;
aAnswers[ 4 ]=0;

function processQuiz()
{
	
	var aResponses= document.forms.form1.question0;
	
	var nCorrectResponses =0;
	


	
	if(aResponses [aAnswers[ 0 ]]. checked ==true)
		{
	
		nCorrectResponses = nCorrectResponses +1;
		}

	aResponses = document.forms.form1.question1;
	
	if(aResponses [aAnswers[ 1 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question2;
	
	
	
	if(aResponses [ aAnswers[ 2 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question3;
	
	
	
	if(aResponses [ aAnswers[ 3 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	
	aResponses= document.forms.form1.question4;
	
	
	
	if(aResponses [ aAnswers[ 4 ]]. checked ==true)
		{
		
		nCorrectResponses = nCorrectResponses +1;
		}
	aResponses= document.forms.form1.question5;
	
	
	
	if(nCorrectResponses>=4)
		{
		document.getElementById("picture1").src="graphics/smiley.svg";
		alert("congratulations!!!");
		
		}
	
	
	
	else
	{
	document.getElementById("picture1").src="graphics/sad.svg";
	alert("fail!!!");
	}


alert("You got "+ nCorrectResponses + "correct!");

	
	

	
}